﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="EditRole.aspx.cs" Inherits="App.Web.Views.App.Account.AccountAdmin.EditRole" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <% App.Account.Models.Forms.RoleForm form = (App.Account.Models.Forms.RoleForm)ViewData.Model; %>
    <h2>
        Edit Role :
        <%= form.RoleName %></h2>
    <h3>
        <%= Html.ActionLink<App.Account.Controllers.AccountAdminController>(c=>c.Roles(null),"<< Return to Listing") %></h3>
    <% using (Html.BeginForm<App.Account.Controllers.AccountAdminController>(c => c.EditRole(form.RoleID)))
       { %>
    <fieldset>
        <legend>Edit Role</legend>
        <br class="clear" />
        <span class="message">
            <%=TempData["Message"] %>
        </span>
        <%= Html.ValidationSummary() %>
        <div>
            <br class="clear" />
            <label>
                <strong>ID</strong></label>
            <div>
                <%= form.RoleID%></div>
            <%= Html.Hidden("RoleID", form.RoleID)%>
        </div>
        <br class="clear" />
        <div>
            <label>
                <strong>Name</strong></label>
            <div>
                <%= Html.TextBox("RoleName", form.RoleName)%></div>
        </div>
        <br class="clear" />
        <div>
            <label>
                <strong>Level</strong></label>
            <div>
                <%= Html.TextBox("Level", form.Level)%></div>
        </div>
        <br class="clear" />
        <div>
            <%= Html.SubmitButton("submit","Save Changes") %></div>
    </fieldset>
    <% } %>
</asp:Content>
